import java.util.*;

class Student {
	String name;
	int age;
	String gender;
}

public class Main {

	static List<Student> convert(List<Map<String, Object>> list) {
		List<Student> studentList = new ArrayList<Student>();
		
		for (int i = 0; i < list.size(); i++) {
			Map<String, Object> map = list.get(i);
			Student s = new Student();
			s.name = (String)map.get("姓名");
			s.age = (int)map.get("年龄");
			s.gender = (String)map.get("性别");
			studentList.add(s);
		}
		return studentList;
	}
	
	public static void main(String[] args) {
		System.out.println("请输入学生人数(不要超过8)：");
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();

		System.out.println("请输入每位同学信息，每个同学一行");
		System.out.println("每行上的内容依次为：姓名、年龄、性别。用空格分隔：");
		List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
		for (int i = 0; i < n; i++) {
			String name = scanner.next();
			int age = scanner.nextInt();
			String gender = scanner.next();
			Map<String, Object> map = new HashMap<String, Object>();
			map.put("姓名", name);
			map.put("年龄", age);
			map.put("性别", gender);
			list.add(map);
		}

		for (int i = 0; i < list.size(); i++) {
			Map<String, Object> map = list.get(i);
			System.out.println((String)map.get("姓名") + '\t' + (int)map.get("年龄") + '\t' + (String)map.get("性别"));
			
		}

		List<Student> studentList = convert(list);
		for (int i = 0; i < studentList.size(); i++) {
			Student s = studentList.get(i);
			System.out.println(s.name + '\t' + s.age + '\t' + s.gender);			
		}
	}
}
